@import "../common/var";

.image-uploader {
  transition: 0.3s;
  width: 100%;
  display: block;
  overflow: hidden;
  .image-item {
    width: 110px;
    height: 110px;
    float: left;
    margin-bottom: 10px;
    margin-right: 10px;
    border-radius: $--border-radius-base;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
    border: $--input-border;
    box-sizing: border-box;
  }

  .preview {
    position: absolute;
    display: none;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.47);
    color: white;
    align-items: center;
    justify-content: center;
    font-size: 20px;
  }

  .image-item:hover .preview {
    display: flex;
    animation: show-start 0.5s;
  }

  .uper {
    background: url('~@/../public/images/plus.svg') no-repeat;
    background-position: center;
    background-size: 30% 30%;
    border: $--input-border;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.5s;
    background-color: $--input-background-color;
    &:hover {
      border-color: $--input-hover-border;
    }

    &:focus {
      border-color: $--input-focus-border;
    }
  }

  .image {
    position: relative;
    border-radius: inherit;
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-sizing: border-box;
  }

  .delete-btn {
    position: absolute;
    right: 0px;
    top: 0px;
    width: 20px;
    height: 20px;
    z-index: 2;
    text-align: center;
    color: white;
  }

  .delete-btn-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate3d(-50%, -50%, 0);
    z-index: 1;
    cursor: pointer;
  }

  .delete-btn:before {
    position: absolute;
    right: 0;
    top: 0;
    content: '';
    width: 0;
    height: 0;
    border-top: 30px solid rgba(255, 5, 12, 0.78);
    border-left: 30px solid transparent;
    z-index: 1;
    cursor: pointer;
  }

  .no-picture-disabled {
    background: url('~@/../public/images/picture2.svg') no-repeat;
    background-position: center;
    background-size: 100% 100%;
    border: none;
    box-sizing: border-box;
    color: rgba(112, 128, 144, 0.4);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@keyframes show-start {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes show-end {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.image-uploader-err{
  .err-list {
    display: flex;
    width: 100%;
  }

  .err-filename {
    flex: 1;
  }
}



